home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ctutor2 / mortypes.c < prev    next >
Text File  |  1986-03-29  |  640b  |  19 lines

  1. /* The purpose of this file is to introduce additional data types */
  2.  
  3. main()
  4. {
  5. int a,b,c;            /* -32768 to 32767 with no decimal point */
  6. char x,y,z;           /* 0 to 255 with no decimal point */
  7. float num,toy,thing;  /* 10E-38 to 10E+38 with decimal point */
  8.  
  9.    a = b = c = -27;
  10.    x = y = z = 'A';
  11.    num = toy = thing = 3.6792;
  12.  
  13.    a = y;           /* a is now 65 (character A) */
  14.    x = b;           /* x will now be a funny number */
  15.    num = b;         /* num will now be -27.00 */
  16.    a = toy;         /* a will now be 3 */
  17.  
  18. }
  19.